3.26 \(\int \frac{A+B x+C x^2}{x \left (a+b x^2+c x^4\right )} \, dx\)

Optimal. Leaf size=229 \[ \frac{(A b-2 a C) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a \sqrt{b^2-4 a c}}-\frac{A \log \left (a+b x^2+c x^4\right )}{4 a}+\frac{A \log (x)}{a}+\frac{\sqrt{2} B \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{2} B \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

[Out]

(Sqrt[2]*B*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqr
t[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (Sqrt[2]*B*Sqrt[c]*ArcTan[(Sqrt[2]
*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 -
 4*a*c]]) + ((A*b - 2*a*C)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a*Sqrt[b
^2 - 4*a*c]) + (A*Log[x])/a - (A*Log[a + b*x^2 + c*x^4])/(4*a)

_______________________________________________________________________________________

Rubi [A]  time = 0.627816, antiderivative size = 229, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 10, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357 \[ \frac{(A b-2 a C) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a \sqrt{b^2-4 a c}}-\frac{A \log \left (a+b x^2+c x^4\right )}{4 a}+\frac{A \log (x)}{a}+\frac{\sqrt{2} B \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{2} B \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x + C*x^2)/(x*(a + b*x^2 + c*x^4)),x]

[Out]

(Sqrt[2]*B*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqr
t[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (Sqrt[2]*B*Sqrt[c]*ArcTan[(Sqrt[2]
*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 -
 4*a*c]]) + ((A*b - 2*a*C)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a*Sqrt[b
^2 - 4*a*c]) + (A*Log[x])/a - (A*Log[a + b*x^2 + c*x^4])/(4*a)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 76.694, size = 216, normalized size = 0.94 \[ \frac{A \log{\left (x^{2} \right )}}{2 a} - \frac{A \log{\left (a + b x^{2} + c x^{4} \right )}}{4 a} - \frac{\sqrt{2} B \sqrt{c} \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{\sqrt{b + \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} + \frac{\sqrt{2} B \sqrt{c} \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{\sqrt{b - \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} + \frac{\left (A b - 2 C a\right ) \operatorname{atanh}{\left (\frac{b + 2 c x^{2}}{\sqrt{- 4 a c + b^{2}}} \right )}}{2 a \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((C*x**2+B*x+A)/x/(c*x**4+b*x**2+a),x)

[Out]

A*log(x**2)/(2*a) - A*log(a + b*x**2 + c*x**4)/(4*a) - sqrt(2)*B*sqrt(c)*atan(sq
rt(2)*sqrt(c)*x/sqrt(b + sqrt(-4*a*c + b**2)))/(sqrt(b + sqrt(-4*a*c + b**2))*sq
rt(-4*a*c + b**2)) + sqrt(2)*B*sqrt(c)*atan(sqrt(2)*sqrt(c)*x/sqrt(b - sqrt(-4*a
*c + b**2)))/(sqrt(b - sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2)) + (A*b - 2*C*a)
*atanh((b + 2*c*x**2)/sqrt(-4*a*c + b**2))/(2*a*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.932439, size = 285, normalized size = 1.24 \[ -\frac{\left (A \left (\sqrt{b^2-4 a c}+b\right )-2 a C\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )}{4 a \sqrt{b^2-4 a c}}-\frac{\left (A \left (\sqrt{b^2-4 a c}-b\right )+2 a C\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{4 a \sqrt{b^2-4 a c}}+\frac{A \log (x)}{a}+\frac{\sqrt{2} B \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\sqrt{2} B \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x + C*x^2)/(x*(a + b*x^2 + c*x^4)),x]

[Out]

(Sqrt[2]*B*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqr
t[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (Sqrt[2]*B*Sqrt[c]*ArcTan[(Sqrt[2]
*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 -
 4*a*c]]) + (A*Log[x])/a - ((A*(b + Sqrt[b^2 - 4*a*c]) - 2*a*C)*Log[-b + Sqrt[b^
2 - 4*a*c] - 2*c*x^2])/(4*a*Sqrt[b^2 - 4*a*c]) - ((A*(-b + Sqrt[b^2 - 4*a*c]) +
2*a*C)*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(4*a*Sqrt[b^2 - 4*a*c])

_______________________________________________________________________________________

Maple [B]  time = 0.038, size = 488, normalized size = 2.1 \[ -4\,{\frac{c\ln \left ( 2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}+b \right ) A}{16\,ac-4\,{b}^{2}}}+{\frac{A{b}^{2}}{a \left ( 16\,ac-4\,{b}^{2} \right ) }\ln \left ( 2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}+b \right ) }-{\frac{Ab}{a \left ( 16\,ac-4\,{b}^{2} \right ) }\sqrt{-4\,ac+{b}^{2}}\ln \left ( 2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}+b \right ) }+2\,{\frac{\sqrt{-4\,ac+{b}^{2}}\ln \left ( 2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}+b \right ) C}{16\,ac-4\,{b}^{2}}}+4\,{\frac{\sqrt{-4\,ac+{b}^{2}}cB\sqrt{2}}{ \left ( 16\,ac-4\,{b}^{2} \right ) \sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}\arctan \left ({\frac{cx\sqrt{2}}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}} \right ) }-4\,{\frac{c\ln \left ( -2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}-b \right ) A}{16\,ac-4\,{b}^{2}}}+{\frac{A{b}^{2}}{a \left ( 16\,ac-4\,{b}^{2} \right ) }\ln \left ( -2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}-b \right ) }+{\frac{Ab}{a \left ( 16\,ac-4\,{b}^{2} \right ) }\sqrt{-4\,ac+{b}^{2}}\ln \left ( -2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}-b \right ) }-2\,{\frac{\sqrt{-4\,ac+{b}^{2}}\ln \left ( -2\,c{x}^{2}+\sqrt{-4\,ac+{b}^{2}}-b \right ) C}{16\,ac-4\,{b}^{2}}}+4\,{\frac{\sqrt{-4\,ac+{b}^{2}}cB\sqrt{2}}{ \left ( 16\,ac-4\,{b}^{2} \right ) \sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}{\it Artanh} \left ({\frac{cx\sqrt{2}}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}} \right ) }+{\frac{A\ln \left ( x \right ) }{a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((C*x^2+B*x+A)/x/(c*x^4+b*x^2+a),x)

[Out]

-4*c/(16*a*c-4*b^2)*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*A+1/a/(16*a*c-4*b^2)*ln(2*c
*x^2+(-4*a*c+b^2)^(1/2)+b)*A*b^2-1/a*(-4*a*c+b^2)^(1/2)/(16*a*c-4*b^2)*ln(2*c*x^
2+(-4*a*c+b^2)^(1/2)+b)*A*b+2*(-4*a*c+b^2)^(1/2)/(16*a*c-4*b^2)*ln(2*c*x^2+(-4*a
*c+b^2)^(1/2)+b)*C+4*c*(-4*a*c+b^2)^(1/2)/(16*a*c-4*b^2)*B*2^(1/2)/((b+(-4*a*c+b
^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))-4*c/(16
*a*c-4*b^2)*ln(-2*c*x^2+(-4*a*c+b^2)^(1/2)-b)*A+1/a/(16*a*c-4*b^2)*ln(-2*c*x^2+(
-4*a*c+b^2)^(1/2)-b)*A*b^2+1/a*(-4*a*c+b^2)^(1/2)/(16*a*c-4*b^2)*ln(-2*c*x^2+(-4
*a*c+b^2)^(1/2)-b)*A*b-2*(-4*a*c+b^2)^(1/2)/(16*a*c-4*b^2)*ln(-2*c*x^2+(-4*a*c+b
^2)^(1/2)-b)*C+4*c*(-4*a*c+b^2)^(1/2)/(16*a*c-4*b^2)*B*2^(1/2)/((-b+(-4*a*c+b^2)
^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))+A*ln(x)/
a

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{A \log \left (x\right )}{a} - \frac{\int \frac{A c x^{3} - B a -{\left (C a - A b\right )} x}{c x^{4} + b x^{2} + a}\,{d x}}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/((c*x^4 + b*x^2 + a)*x),x, algorithm="maxima")

[Out]

A*log(x)/a - integrate((A*c*x^3 - B*a - (C*a - A*b)*x)/(c*x^4 + b*x^2 + a), x)/a

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/((c*x^4 + b*x^2 + a)*x),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x**2+B*x+A)/x/(c*x**4+b*x**2+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.866925, size = 1, normalized size = 0. \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/((c*x^4 + b*x^2 + a)*x),x, algorithm="giac")

[Out]

Done